<template>
  <div class="app-container">
    <div class="tech-background">
      <div class="grid"></div>
      <div class="circles">
        <div></div>
        <div></div>
        <div></div>
      </div>
    </div>
    
    <div class="nav-sidebar">
      <h2 style="font-family: 宋体;">中国历年农产品产量分析可视化</h2>
      <el-menu
        :router="true"
        default-active="/"
        class="nav-menu"
        background-color="transparent"
        text-color="#8c8c8c"
        active-text-color="#4facfe"
      >
        <el-menu-item index="/">
          <span>历年对比</span>
        </el-menu-item>
        <el-menu-item index="/second">
          <span>产量分析</span>
        </el-menu-item>
        <el-menu-item index="/third">
          <span>产量趋势</span>
        </el-menu-item>
        <el-menu-item index="/map">
          <span>产量分布</span>
        </el-menu-item>
      </el-menu>
    </div>
    <div class="main-content">
      <router-view></router-view>
    </div>
  </div>
</template>

<script setup>
</script>

<style>
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: linear-gradient(to bottom, #1a1f3c, #162447);
  position: relative;
  overflow: hidden;
}

.tech-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.grid {
  position: absolute;
  width: 200%;
  height: 200%;
  background-image: 
    linear-gradient(rgba(79, 172, 254, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 172, 254, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  transform-origin: 0 0;
  animation: grid-move 15s linear infinite;
  opacity: 0.5;
}

.circles div {
  position: absolute;
  border: 2px solid rgba(79, 172, 254, 0.1);
  border-radius: 50%;
  animation: circle-float 8s infinite;
}

.circles div:nth-child(1) {
  width: 200px;
  height: 200px;
  left: 10%;
  top: 10%;
  border-color: rgba(0, 242, 254, 0.1);
  animation-delay: 0s;
}

.circles div:nth-child(2) {
  width: 400px;
  height: 400px;
  right: 10%;
  bottom: 10%;
  border-color: rgba(79, 172, 254, 0.1);
  animation-delay: -2s;
}

.circles div:nth-child(3) {
  width: 300px;
  height: 300px;
  left: 50%;
  top: 50%;
  border-color: rgba(0, 242, 254, 0.15);
  animation-delay: -4s;
}

.nav-sidebar {
  width: 200px;
  background-color: rgba(26, 31, 60, 0.8);
  color: white;
  padding: 20px 0;
  border-right: 1px solid rgba(79, 172, 254, 0.2);
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.nav-sidebar h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #fff;
  font-size: 1.2rem;
  padding: 0 20px;
  text-shadow: 0 0 10px rgba(79, 172, 254, 0.3);
}

.main-content {
  flex: 1;
  padding: 0;
  position: relative;
  z-index: 1;
}

.nav-menu {
  border-right: none;
  background-color: transparent !important;
}

.el-menu-item {
  position: relative;
  margin: 4px 0;
}

.el-menu-item:hover {
  background: linear-gradient(90deg, rgba(79, 172, 254, 0.1), transparent) !important;
}

.el-menu-item.is-active {
  background: linear-gradient(90deg, rgba(79, 172, 254, 0.15), transparent) !important;
  border-left: 3px solid #4facfe;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 31, 60, 0.8);
}

@keyframes grid-move {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes circle-float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.tech-background::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    circle at 50% 50%,
    rgba(79, 172, 254, 0.1) 0%,
    transparent 50%
  );
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}
</style>
